<%# Remove any lingering alert messages %>
$('.alert').remove()

<%# Add a new unpaid entry to to the cart box %>
$('#cart_items').append("<%= j render(:partial => "itineraries/unpaid_line_item", :locals => {:unpaid_line_item => @line_item, :itinerary => @line_item.itinerary}) %>");


 
<%# Find the current cart total, add the line item price to it
  #recalculate the tax, redisplay those figures, and remove the line item from the add to cart table 
%>
var total = parseFloat($('#cart_price').text());
total = (total + <%= @line_item.price%>).toFixed(2);
tax = (total * <%= @tax_rate %>).toFixed(2);
$('#cart_price').html(total);
$('#cart_tax').html(tax);
$('#cart').hide().show();
$('#item_<%= j "#{@line_item.conference_item_id}" %>').remove();
